﻿#if !SILVERLIGHT && !NETFX_CORE
using System.Windows;
#endif

namespace DaveSexton.Labs
{
	internal static class PlatformRuntime
	{
#if SILVERLIGHT || NETFX_CORE
		public static bool IsInDesignMode()
#else
		public static bool IsInDesignMode(DependencyObject element)
#endif
		{
#if NETFX_CORE
			return Windows.ApplicationModel.DesignMode.DesignModeEnabled;
#elif SILVERLIGHT
			return System.ComponentModel.DesignerProperties.IsInDesignTool;
#else
			return System.ComponentModel.DesignerProperties.GetIsInDesignMode(element);
#endif
		}
	}
}